using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._EditingTools
{
    /// <summary>
    /// <para>Generalize</para>
    /// <para>Simplifies the input features using a specified maximum offset tolerance. The output features will contain a subset of the original input vertices.</para>
    /// <para>使用指定的最大偏移容差简化输入特征。输出要素将包含原始输入折点的子集。</para>
    /// </summary>    
    [DisplayName("Generalize")]
    public class Generalize : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public Generalize()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_features">
        /// <para>Input Features</para>
        /// <para>The polygon or line features to be generalized.</para>
        /// <para>要概化面或线要素。</para>
        /// </param>
        public Generalize(object _in_features)
        {
            this._in_features = _in_features;
        }
        public override string ToolboxName => "Editing Tools";

        public override string ToolName => "Generalize";

        public override string CallName => "edit.Generalize";

        public override List<string> AcceptEnvironments => ["autoCommit", "workspace"];

        public override object[] ParameterInfo => [_in_features, _tolerance, _out_feature_class];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The polygon or line features to be generalized.</para>
        /// <para>要概化面或线要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_features { get; set; }


        /// <summary>
        /// <para>Tolerance</para>
        /// <para>The tolerance sets the maximum allowable offset, which will determine the degree of simplification. This value limits the distance the output geometry can differ from the input geometry. You can specify a preferred unit of measurement. The default is the feature unit.</para>
        /// <para>公差设置最大允许偏移量，这将决定简化程度。此值限制输出几何图形与输入几何图形的差异距离。您可以指定首选的度量单位。默认值为要素单位。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Tolerance")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public string? _tolerance { get; set; } = null;


        /// <summary>
        /// <para>Updated Input Features</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_feature_class { get; set; }


        public Generalize SetEnv(int? autoCommit = null, object workspace = null)
        {
            base.SetEnv(autoCommit: autoCommit, workspace: workspace);
            return this;
        }

    }

}